package com.xm9m.web.service.constants;

/**
 * Created by Liutong on 1/18/16.
 */
public enum StatusCode {
    /**
     * 公共
     */
    SUCCESS(200, "成功"),

    /**
     * 用户相关
     */
    LOGIN_ERROR(10, "用户名或密码错误"),
    NOT_LOGIN(11, "用户未登录"),
    USER_EXISTS(12, "用户已存在"),
    USER_NO_EXISTS(13, "用户不存在"),
    DEVICE_ALREADY_BIND(14, "设备已被绑定"),
    USER_ERROR(403, "用户验证失败,需重新登录"),
    UNKNOWN_ERROR(500, "未知的错误"),

    /**
     * 短信验证码
     */
    CAPTCHA_ERROR(20, "验证码错误"),
    LICENSE_ERROR(22, "授权码失效,请重新获取"),
    SMS_SENDING(21, "信息已发送，请耐心等待..."),


    /**
     * 账户相关
     */

    INSUFFICIENT_BALANCE(40, "余额不足"),
    WITHDRAW_ERROR(41, "提现金额最低为十元"),
    WITHDRAW_NUM_ERROR(45, "输入有误"),
    TASK_HAS_FINISHED(47,"任务已经完成"),
    /**
     * 接口相关
     */
    PARAM_WRONG(30, "参数检查错误"),

    NOT_FOUND(404, "接口不存在"),

    NOT_BIND_WEICHAT(405, "未绑定微信"),

    /**
     * 领取集分宝相关
     */
    HAS_GET(50, "已领取"),
    HAS_FINISH(51, "活动已结束");


    private int code;
    private String message;

    StatusCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
